import { defineStore } from 'pinia'
import { Categroy, User } from '../type/entity'

let user:User = {
  account: '',
  userName: '',
  password: ''
}
export const emptyUser:User = {
  account: '',
  userName: '',
  password: ''
}
export const useUserStore = defineStore('user', {
  // 推荐使用 完整类型推断的箭头函数
  state: () => {
    return {
      user,
      categories: [] as Categroy[]
    }
  },
})

